Skip to content

support extension on Garden resource#280

Draft
hown3d wants to merge 16 commits into
mainfrom
garden-extension
Draft

support extension on Garden resource#280
hown3d wants to merge 16 commits into
mainfrom
garden-extension

Conversation

@hown3d
Copy link
Copy Markdown
Member

@hown3d hown3d commented May 5, 2026

What this PR does / why we need it:
Allows to use the ACL extension to restrict access to the virtual garden API server

Which issue(s) this PR fixes:
Fixes gardener/hackathon#47

Special notes for your reviewer:

Copy link
Copy Markdown
Member

@timebertt timebertt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review together with @MichaelEischer @mstueer @hammadzf

Comment thread charts/gardener-extension-acl/templates/deployment.yaml Outdated
Comment thread charts/gardener-extension-acl/templates/deployment.yaml Outdated
Comment thread pkg/helper/seed.go Outdated
Comment thread pkg/helper/seed.go Outdated
- get
- list
- watch
{{- end }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double-check if we need all of the remaining permissions in the garden case.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having a seperate roles that clearly define which permissions are granted for the extensions is easier to read. I will refactor this.

Comment thread pkg/controller/add.go
var gardenCluster cluster.Cluster
if kFile := os.Getenv("GARDEN_KUBECONFIG"); kFile != "" {
var err error
gardenCluster, err = setupGardenCluster(mgr, kFile)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should happen in app.go not in the controller package

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but there where would I put the cluster to pass it through to the predicate?
The controllers are registered via controllerSwitches which expects the AddToManger(ctx, mgr) signature.

Binding to AddOptions could be an option, but this seems a bit weird. WDYT?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest passing a new cluster.Cluster param to ControllerSwitches, then you can wrap the actual AddToManager(ctx, mgr, cluster) call in a func(context.Context, manager.Manager)

Copy link
Copy Markdown
Member Author

@hown3d hown3d May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not work well because the controller switches are registered before the manager is setup and I would like to setup the cluster next to the manager.

Comment thread pkg/controller/actuator.go Outdated
Comment thread pkg/controller/actuator.go Outdated
Comment thread pkg/controller/actuator.go Outdated
Comment thread pkg/controller/allowedcidrs/errors.go
@hown3d hown3d force-pushed the garden-extension branch 4 times, most recently from 04a3249 to fd64462 Compare May 27, 2026 13:37
hown3d added 16 commits May 27, 2026 16:14
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
Signed-off-by: Lukas Hoehl <lukas.hoehl@stackit.cloud>
@hown3d hown3d force-pushed the garden-extension branch from fd64462 to f1d8cf0 Compare May 27, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for virtual Garden to ACL Extension

2 participants